<?php

/**
 * 子应用入口
 * @param  array
 * @return [type]
 */
function run_user_app($uri = array()) {
	require_once APP_PATH . '/user/helper.php';
	if (isset($uri[2]) && !empty($uri[2])) {
		$action = $uri[2];
		switch ($action) {
		case 'register':
			require_once APP_PATH . '/user/register.php';
			break;
		case 'login':
			require_once APP_PATH . '/user/login.php';
			break;
		default:
			require_once APP_PATH . '/user/home.php';
			break;
		}

	} else {
		require_once APP_PATH . '/user/home.php';
	}
}